from django.urls import path
from .views import *

urlpatterns = [

    # 新增 获取 标签
    path("tags/", TagView.as_view({"post": "add_tag", "get": "list_tag"})),

    # 修改标签
    path("tag/<int:pk>/", TagView.as_view({"put": "up_tag", "delete": "del_tag", "get": "one_tag"})),

    # 添加分类 获取全部分类
    path("classifys/", ClassIfyView.as_view({"post": "add_classify", "get": "list_classify"})),

    # 修改分类
    path("classify/<int:pk>/", ClassIfyView.as_view({"put": "up_classify", "delete": "del_classify"})),

    # 添加学习内容 获取学习内容
    path("contents/", ContentsView.as_view({"post": "add_contents", "get": "list_contents"})),

    # 删除学习内容 修改学习内容 获取一个学习内容
    path("content/<int:pk>/", ContentsView.as_view({"delete": "del_contents", "put": "up_contents", "get": "one_contents"})),

    # 获取一个学习内容的全部弹幕
    path("barrages/<int:pk>/", ContentsView.as_view({"get": "barrage_contents"})),

    # 获取 添加 学习资源
    path("wealths/", WealthView.as_view({"get": "list_wealth", "post": "add_wealth"})),

    # 获取我上传的学习资源
    path("me-wealth/", WealthView.as_view({"get": "me_wealth"})),

    # 修改我的资源
    path("me-wealth/<int:pk>/", WealthView.as_view({"put": "up_wealth", "delete": "del_wealth", "get": "details_wealth"})),

    # 添加学习任务 获取学习任务
    path("tasks/", TaskView.as_view({"post": "add_task", "get": "list_task"})),

    # 获取学习任务详情
    path("task/<int:pk>/", TaskView.as_view({"get": "details_task"})),

    # 获取老师下的所有学生的学习记录
    path("teacher_record/", RecordView.as_view({"get": "teacher_record"})),

    # 获取我的全部学习记录
    path("records/", RecordView.as_view({"get": "list_record"})),

    # 获取没有完成的学习记录
    path("incompletes/", RecordView.as_view({"get": "incomplete_record"})),

    # 获取作弊完成的学习记录
    path("plagiarizes/", RecordView.as_view({"get": "plagiarize_record"})),

    # 获取完成的学习记录
    path("finishs/", RecordView.as_view({"get": "finish_record"})),

    # 获取费力完成的学习记录
    path("strenuositys/", RecordView.as_view({"get": "strenuosity_record"})),

    # 修改学习状态
    path("upd_record/<int:pk>/", RecordView.as_view({"put": "upd_record"})),

    # 添加评论
    path("comments/", CommentView.as_view({"post": "add_comment"})),

    # 获取评论
    path("comments/<int:pk>/", CommentView.as_view({"get": "list_comment"})),

    # 添加 取消 收藏
    path("collects/<int:pk>/", CollectView.as_view({"post": "add_collect", "delete": "del_collect"})),

    # 获取我的收藏
    path("collect/", CollectView.as_view({"get": "me_collect"})),

]